.class public Les/v9;
.super Ljava/lang/Object;
.source "AudioBlankPCMProducer.java"

# interfaces
.implements Lcom/esfile/screen/recorder/media/util/m;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Les/v9$b;,
        Les/v9$c;
    }
.end annotation


# instance fields
.field private final a:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/esfile/screen/recorder/media/util/l;",
            ">;"
        }
    .end annotation
.end field

.field private b:I

.field private c:I

.field private d:Les/v9$c;

.field private e:J

.field private f:Les/v9$b;


# direct methods
.method public constructor <init>(II)V
    .locals 2

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    new-instance v0, Ljava/util/ArrayList;

    const/4 v1, 0x1

    invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(I)V

    iput-object v0, p0, Les/v9;->a:Ljava/util/List;

    const-wide/16 v0, 0x0

    .line 3
    iput-wide v0, p0, Les/v9;->e:J

    .line 4
    iput p1, p0, Les/v9;->b:I

    .line 5
    iput p2, p0, Les/v9;->c:I

    return-void
.end method

.method static synthetic a(Les/v9;)Lcom/esfile/screen/recorder/media/util/l;
    .locals 0

    .line 1
    invoke-direct {p0}, Les/v9;->c()Lcom/esfile/screen/recorder/media/util/l;

    move-result-object p0

    return-object p0
.end method

.method private a(Lcom/esfile/screen/recorder/media/util/l;)V
    .locals 2

    .line 7
    iget-object v0, p0, Les/v9;->a:Ljava/util/List;

    monitor-enter v0

    .line 8
    :try_start_0
    iget-object v1, p0, Les/v9;->a:Ljava/util/List;

    invoke-interface {v1, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 9
    monitor-exit v0

    return-void

    :catchall_0
    move-exception p1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p1
.end method

.method static synthetic b(Les/v9;)Les/v9$b;
    .locals 0

    .line 1
    iget-object p0, p0, Les/v9;->f:Les/v9$b;

    return-object p0
.end method

.method static synthetic c(Les/v9;)I
    .locals 0

    .line 1
    iget p0, p0, Les/v9;->b:I

    return p0
.end method

.method private c()Lcom/esfile/screen/recorder/media/util/l;
    .locals 4

    .line 2
    iget-object v0, p0, Les/v9;->a:Ljava/util/List;

    monitor-enter v0

    .line 3
    :try_start_0
    iget-object v1, p0, Les/v9;->a:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->isEmpty()Z

    move-result v1

    const/4 v2, 0x0

    if-eqz v1, :cond_0

    .line 4
    new-instance v1, Landroid/media/MediaCodec$BufferInfo;

    invoke-direct {v1}, Landroid/media/MediaCodec$BufferInfo;-><init>()V

    .line 5
    iput v2, v1, Landroid/media/MediaCodec$BufferInfo;->offset:I

    const/16 v2, 0x1000

    .line 6
    iput v2, v1, Landroid/media/MediaCodec$BufferInfo;->size:I

    .line 7
    new-instance v3, Lcom/esfile/screen/recorder/media/util/l;

    invoke-static {v2}, Ljava/nio/ByteBuffer;->allocateDirect(I)Ljava/nio/ByteBuffer;

    move-result-object v2

    invoke-direct {v3, p0, v2, v1}, Lcom/esfile/screen/recorder/media/util/l;-><init>(Lcom/esfile/screen/recorder/media/util/m;Ljava/nio/ByteBuffer;Landroid/media/MediaCodec$BufferInfo;)V

    goto :goto_0

    .line 8
    :cond_0
    iget-object v1, p0, Les/v9;->a:Ljava/util/List;

    invoke-interface {v1, v2}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    move-result-object v1

    move-object v3, v1

    check-cast v3, Lcom/esfile/screen/recorder/media/util/l;

    .line 9
    iget-object v1, v3, Lcom/esfile/screen/recorder/media/util/l;->b:Ljava/nio/ByteBuffer;

    invoke-virtual {v1}, Ljava/nio/ByteBuffer;->clear()Ljava/nio/Buffer;

    .line 10
    :goto_0
    monitor-exit v0

    return-object v3

    :catchall_0
    move-exception v1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v1
.end method

.method static synthetic d(Les/v9;)I
    .locals 0

    .line 1
    iget p0, p0, Les/v9;->c:I

    return p0
.end method

.method static synthetic e(Les/v9;)J
    .locals 2

    .line 1
    iget-wide v0, p0, Les/v9;->e:J

    return-wide v0
.end method


# virtual methods
.method public a()V
    .locals 3

    .line 2
    iget-object v0, p0, Les/v9;->d:Les/v9$c;

    if-eqz v0, :cond_0

    .line 3
    invoke-virtual {v0}, Les/v9$c;->a()V

    .line 4
    :cond_0
    new-instance v0, Les/v9$c;

    const/4 v1, 0x0

    invoke-direct {v0, p0, v1}, Les/v9$c;-><init>(Les/v9;Les/v9$a;)V

    iput-object v0, p0, Les/v9;->d:Les/v9$c;

    .line 5
    new-instance v0, Ljava/lang/Thread;

    iget-object v1, p0, Les/v9;->d:Les/v9$c;

    const-string v2, "ProduceTask"

    invoke-direct {v0, v1, v2}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/lang/Thread;->start()V

    return-void
.end method

.method public a(Lcom/esfile/screen/recorder/media/util/l;Z)V
    .locals 0

    .line 6
    invoke-direct {p0, p1}, Les/v9;->a(Lcom/esfile/screen/recorder/media/util/l;)V

    return-void
.end method

.method public a(Les/v9$b;)V
    .locals 0

    .line 10
    monitor-enter p0

    .line 11
    :try_start_0
    iput-object p1, p0, Les/v9;->f:Les/v9$b;

    .line 12
    monitor-exit p0

    return-void

    :catchall_0
    move-exception p1

    monitor-exit p0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p1
.end method

.method public b()V
    .locals 1

    .line 2
    iget-object v0, p0, Les/v9;->d:Les/v9$c;

    if-eqz v0, :cond_0

    .line 3
    invoke-virtual {v0}, Les/v9$c;->a()V

    const/4 v0, 0x0

    .line 4
    iput-object v0, p0, Les/v9;->d:Les/v9$c;

    :cond_0
    return-void
.end method
